Class como.awt.ImageClick
All Packages Class Hierarchy This Package Previous Next Index
Class como.awt.ImageClick
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----como.awt.ImageClick
- public class ImageClick
- extends Canvas
ImageButton is a button which uses images to represent
the states of the button - normal, pressed.
They don't have to be fully loaded! They will be loaded
asynchronously here!
-
ImageClick(Image)
-
-
getPos()
- Get the current state of the switch! (if it's a button
you will get true if it's currently pressed).
-
gotFocus(Event, Object)
-
-
handleEvent(Event)
- handle the MouseDownEvents.
-
imageUpdate(Image, int, int, int, int, int)
- Tell me all about the image ;-)
(inspired from Component.java)
-
keyDown(Event, int)
- Move the focus to the next component
Does NOT work! (cause nextFocus() doesn't do what I wanted)
-
lostFocus(Event, Object)
-
-
paint(Graphics)
- Draws the picture on the screen (if parts are loaded,
then it draws those parts).
-
preferredSize()
-
-
setEditable(boolean)
-
-
setImageSize()
-
-
setPos(int, int)
-
-
setPos(Point)
- Set the current state of the switch!
(If it is a button then do nothing!)
ImageClick
public ImageClick(Image i)
setPos
public void setPos(int x,
int y)
setPos
public void setPos(Point pos)
- Set the current state of the switch!
(If it is a button then do nothing!)
- Parameters:
- onoff - indicating on or off
setEditable
public void setEditable(boolean e)
getPos
public Point getPos()
- Get the current state of the switch! (if it's a button
you will get true if it's currently pressed).
- Returns:
- if the switch is on then return true; else false.
keyDown
public boolean keyDown(Event evt,
int key)
- Move the focus to the next component
Does NOT work! (cause nextFocus() doesn't do what I wanted)
- Overrides:
- keyDown in class Component
handleEvent
public boolean handleEvent(Event evt)
- handle the MouseDownEvents.
- Overrides:
- handleEvent in class Component
paint
public void paint(Graphics graphics)
- Draws the picture on the screen (if parts are loaded,
then it draws those parts).
Overrides paint-Method.
- Overrides:
- paint in class Canvas
gotFocus
public boolean gotFocus(Event evt,
Object what)
- Overrides:
- gotFocus in class Component
lostFocus
public boolean lostFocus(Event evt,
Object what)
- Overrides:
- lostFocus in class Component
imageUpdate
public boolean imageUpdate(Image img,
int flags,
int x,
int y,
int w,
int h)
- Tell me all about the image ;-)
(inspired from Component.java)
- Overrides:
- imageUpdate in class Component
setImageSize
public void setImageSize()
preferredSize
public Dimension preferredSize()
- Overrides:
- preferredSize in class Component
All Packages Class Hierarchy This Package Previous Next Index